package com.example.controller;

import com.example.publish.PublishSubscribeSender;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 请求http://127.0.0.1:8080/publishSubscribe
 */
@RequestMapping
@RestController
public class PublishSubscribeTestsController {
    @Autowired
    private PublishSubscribeSender publishSubscribeSender;
    @GetMapping("publishSubscribe")
    public String publishSubscribe() {
        publishSubscribeSender.send(5201314);
        return "publishSubscribeOk";
    }
}
